import { getDetailApi } from "@/services/detailService";

const actionCreatorAddData = data=>({type:"detail",data})
export const getDetailAction = ()=>async dispatch=>{
    const data = await(await getDetailApi()).data
    dispatch(actionCreatorAddData(data))
}


// const actionCreatorsaveData=data=>({type:"saveDetail",data})
// export const saveDetailAction = (done)=>async dispatch=>{
//     const res = await(await getDetailAction()).data
//     if(done){
//         dispatch(actionCreatorsaveData(res))
//     }else dispatch(actionCreatorsaveData({}))
// }
